<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>EOS.IO: native::contract Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacenative.html">native</a></li><li class="navelem"><a class="el" href="structnative_1_1contract.html">contract</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="structnative_1_1contract-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">native::contract Struct Reference<div class="ingroups"><a class="el" href="group__eoscontract.html">EOS Contract</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Defines the base class for all contracts.  
</p>
<div class="dynheader">
Inheritance diagram for native::contract:</div>
<div class="dyncontent">
<div class="center"><img src="structnative_1_1contract__inherit__graph.png" border="0" usemap="#native_1_1contract_inherit__map" alt="Inheritance graph"/></div>
<map name="native_1_1contract_inherit__map" id="native_1_1contract_inherit__map">
<area shape="rect" id="node2" href="structnative_1_1eos.html" title="A native currency contract implemented with account named eos " alt="" coords="18,80,105,107"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4422c14a4842b5d25917b7dbda0e7dc2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnative_1_1contract.html#a4422c14a4842b5d25917b7dbda0e7dc2">setcode</a> (Bytes code, Abi abi, <a class="el" href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> vm=0, <a class="el" href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> vm_version=0) final</td></tr>
<tr class="memdesc:a4422c14a4842b5d25917b7dbda0e7dc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">updates the code that will be executed for this contract  <a href="#a4422c14a4842b5d25917b7dbda0e7dc2">More...</a><br /></td></tr>
<tr class="separator:a4422c14a4842b5d25917b7dbda0e7dc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74eb5f9ef72cb07a653e0c0e0c409c82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnative_1_1contract.html#a74eb5f9ef72cb07a653e0c0e0c409c82">setauth</a> (Name permission, Name parent, Authority auth) final</td></tr>
<tr class="memdesc:a74eb5f9ef72cb07a653e0c0e0c409c82"><td class="mdescLeft">&#160;</td><td class="mdescRight">updates the authority required for a named permission  <a href="#a74eb5f9ef72cb07a653e0c0e0c409c82">More...</a><br /></td></tr>
<tr class="separator:a74eb5f9ef72cb07a653e0c0e0c409c82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab734182ae6b1e92c2fe1a55f12418961"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnative_1_1contract.html#ab734182ae6b1e92c2fe1a55f12418961">setperm</a> (Name con, Name act, Name myperm)</td></tr>
<tr class="memdesc:ab734182ae6b1e92c2fe1a55f12418961"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the local named permission required for <code>this</code> account/contract to call <code>con::act(...)</code>  <a href="#ab734182ae6b1e92c2fe1a55f12418961">More...</a><br /></td></tr>
<tr class="separator:ab734182ae6b1e92c2fe1a55f12418961"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a74eb5f9ef72cb07a653e0c0e0c409c82"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void native::contract::setauth </td>
          <td>(</td>
          <td class="paramtype">Name&#160;</td>
          <td class="paramname"><em>permission</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Name&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Authority&#160;</td>
          <td class="paramname"><em>auth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<h3>Required Authority </h3>
<p>Requires authority of <em>this</em> contract.</p>
<h3>Required Scope </h3>
<p>Requires scope of <em>this</em> contract. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">permission</td><td>the name for the permission being set </td></tr>
    <tr><td class="paramname">parent</td><td>the parent permission to this permission </td></tr>
    <tr><td class="paramname">auth</td><td>the set of keys/accounts and threshold ); </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4422c14a4842b5d25917b7dbda0e7dc2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void native::contract::setcode </td>
          <td>(</td>
          <td class="paramtype">Bytes&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Abi&#160;</td>
          <td class="paramname"><em>abi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>vm</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>vm_version</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<h3>Required Authority </h3>
<p>Requires authority of <em>this</em> contract.</p>
<h3>Required Scope </h3>
<p>Requires scope of <em>this</em> contract.</p>
<dl class="section note"><dt>Note</dt><dd>the change in code does not take effect until the start of the next block </dd></dl>

</div>
</div>
<a class="anchor" id="ab734182ae6b1e92c2fe1a55f12418961"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void native::contract::setperm </td>
          <td>(</td>
          <td class="paramtype">Name&#160;</td>
          <td class="paramname"><em>con</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Name&#160;</td>
          <td class="paramname"><em>act</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Name&#160;</td>
          <td class="paramname"><em>myperm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<h3>Required Authority </h3>
<p>Requires authority of <em>this</em> contract.</p>
<h3>Required Scope </h3>
<p>Requires scope of <em>this</em> contract.</p>
<dl class="section pre"><dt>Precondition</dt><dd>myperm must be defined by prior call to <a class="el" href="structnative_1_1contract.html#a74eb5f9ef72cb07a653e0c0e0c409c82">setauth</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">con</td><td>- the name of the contract this permission applies </td></tr>
    <tr><td class="paramname">act</td><td>- the name of the action on con this permission applies to </td></tr>
    <tr><td class="paramname">myperm</td><td>- the name of a permission set by <a class="el" href="structnative_1_1contract.html#a74eb5f9ef72cb07a653e0c0e0c409c82">setauth</a> on <code>this</code> contract </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>contracts/eos/<a class="el" href="eos_8cpp.html">eos.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
